<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title></title>
	<link rel="stylesheet" href="">
</head>
<body>
<script type="text/javascript">
	var arr = [{
			days: "2018-11-28",
			id: 166,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/cdb5b0718adc5f96995adae7a728a744.jpg",
			model_id: 2,
			name: "神经病",
			status: 1,
			times: "11:00、12:00",
			user_id: 3
		}, 
		{
			days: "2018-11-28",
			id: 168,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/cdb5b0718adc5f96995adae7a728a744.jpg",
			model_id: 2,
			name: "神经病",
			status: 1,
			times: "9:00、10:00",
			user_id: 3,
		},
		{
			days: "2018-11-28",
			id: 168,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/cdb5b0718adc5f96995adae7a728a744.jpg",
			model_id: 2,
			name: "神经病",
			status: 1,
			times: "16:00、17:00",
			user_id: 3,
		},  
		{
			days: "2018-11-28",
			id: 168,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/cdb5b0718adc5f96995adae7a728a744.jpg",
			model_id: 2,
			name: "神经病",
			status: 1,
			times: "14:00、15:00",
			user_id: 3,
		}, 
		{
			days: "2018-11-28",
			id: 168,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/cdb5b0718adc5f96995adae7a728a744.jpg",
			model_id: 2,
			name: "神经病",
			status: 1,
			times: "16:00、17:00、18:00",
			user_id: 3,
		},
		{
			days: "2018-12-03",
			id: 161,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/cdb5b0718adc5f96995adae7a728a744.jpg",
			model_id: 2,
			name: "神经病",
			status: 1,
			times: "10:00",
			user_id: 3,
		}, 
		{
			days: "2018-12-03",
			id: 161,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/cdb5b0718adc5f96995adae7a728a744.jpg",
			model_id: 2,
			name: "神经病",
			status: 1,
			times: "11:00、12:00",
			user_id: 3,
		}, 
		{
			days: "2018-12-03",
			id: 161,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/cdb5b0718adc5f96995adae7a728a744.jpg",
			model_id: 2,
			name: "神经病",
			status: 1,
			times: "13:00、14:00",
			user_id: 3,
		}, 
		{
			days: "2018-11-23",
			id: 150,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/f27cd3716e375070a335eb8203a8d9ec.png",
			model_id: 11,
			name: "大小兄弟",
			status: 1,
			times: "9:00、10:00、11:00",
			user_id: 3,
		}, 
		{
			days: "2018-11-23",
			id: 150,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/f27cd3716e375070a335eb8203a8d9ec.png",
			model_id: 11,
			name: "大小兄弟",
			status: 1,
			times: "12:00、13:00、14:00",
			user_id: 3,
		}, 
		{
			days: "2018-11-24",
			id: 149,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/f27cd3716e375070a335eb8203a8d9ec.png",
			model_id: 11,
			name: "大小兄弟",
			status: 1,
			times: "10:00、16:00、21:00",
			user_id: 3,
		}, 
		{
			days: "2018-12-04",
			id: 162,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/f27cd3716e375070a335eb8203a8d9ec.png",
			model_id: 11,
			name: "大小兄弟",
			status: 1,
			times: "9:00",
			user_id: 3,
		}]

		function hander(arr){
			for(var i=0;i < arr.length;i++){
				for(var j= i+1;j < arr.length; j++){
					if(arr[i].days == arr[j].days){
						arr[i].times = arr[i].times.split('、').concat(arr[j].times.split('、')).join("、")
						arr.splice(j,1);
					}
				}
			}
		}

		
		hander(arr)
		hander(arr)
		console.log(arr)


		var str = "8:00、9:00、10:00"
		str = str.replace(/:00/g,"#").replace(/、/g,"")
		str = str.substr(0,str.length-1)
		console.log(str)


		// 处理时间time
        function _hande_time(time){
            time = time.replace(/:00/g,"#").replace(/、/g,"")
            time = time.substr(0,time.length-1)
            return time
        },
</script>	
</body>
</html>